import { createApp } from 'vue'
import App from './App.vue'
import { setupRouter } from './router/index'
import ElementPlus from 'element-plus'
import { createPinia } from 'pinia'
import { setupAuth } from './permission'
import 'element-plus/dist/index.css'
import './permission'

// 创建实例
const setupAll = async () => {
  const app = createApp(App)
  setupRouter(app)
  setupAuth(app)
  app.use(ElementPlus)
  app.use(createPinia())
  app.mount('#app')
}

setupAll()